package com.zpp.system.domain.question.dto;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

@Data
public class QuestionAddDTO {
    @NotBlank(message = "标题不能为空")
    private String title;        //题目标题

    @Range(min = 1, max = 3, message = "难度只能为简单、中等或困难")
    private Integer difficulty;  //困难等级 1:简单、2:中等、3:困难

    @Min(value = 1, message = "时间必须大于等于1")
    private Long timeLimit;      //时间限制

    @Min(value = 1, message = "空间必须大于等于1")
    private Long spaceLimit;     //空间限制

    @NotBlank(message = "题目不能为空")
    private String content;      //题目内容

    @NotBlank(message = "题目用例不能为空")
    private String questionCase; //题目用例

    @NotBlank(message = "默认代码不能为空")
    private String defaultCode;  //默认代码

    @NotBlank(message = "main函数不能为空")
    private String mainFunc;     //main函数
}
